﻿using System.ComponentModel;
using System.Threading.Tasks;
using Abp.Application.Services;
using Abp.Application.Services.Dto;
using SingleUserMall.Common;
using SingleUserMall.Roles.Form;
using SingleUserMall.Roles.VO;

namespace SingleUserMall.Roles
{
    /// <summary>
    /// 角色管理
    /// </summary>
    [Description("角色管理")]
    public interface IRoleManageAppService : IManageService
    {
        /// <summary>
        /// 获取所有权限列表
        /// </summary>
        /// <returns></returns>
        Task<ListResultDto<PermissionVO>> GetAllPermissionsAsync();
        /// <summary>
        /// 获取所有角色
        /// </summary>
        /// <returns></returns>
        Task<ListResultDto<RoleVO>> GetRolesAsync(RoleSearchForm form);
        /// <summary>
        /// 获取角色详情
        /// </summary>
        /// <returns></returns>
        Task<RoleVO> GetRoleAsync(SingleId<int> form);
        /// <summary>
        /// 保存角色
        /// </summary>
        /// <param name="form"></param>
        /// <returns></returns>
        Task SaveRoleAsync(RoleForm form);
        /// <summary>
        /// 移除角色
        /// </summary>
        /// <param name="form"></param>
        /// <returns></returns>
        Task RemoveRoleAsync(SingleId<int> form);
    }
}
